package com.walter.dto.content;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 保存草稿
 *
 * @author wuchenxi
 * @date 2020-08-11 16:44:48
 */
@Data
@ApiModel
public class DraftDTO {

    @ApiModelProperty(name = "id", value = "文章id")
    private String id;

    /**
     * 文章标题
     */
    @ApiModelProperty(name = "title", value = "文章标题", required = true)
    @NotEmpty(message = "文章标题不能为空！")
    @NotNull(message = "文章标题不能为空！")
    private String title;

    /**
     * 文章副标题
     */
    @ApiModelProperty(name = "secondTitle", value = "文章副标题")
    private String secondTitle;

    /**
     * markdown标签内容
     */
    @NotEmpty(message = "内容不能为空！")
    @NotNull(message = "内容不能为空！")
    @ApiModelProperty(name = "content", value = "markdown标签内容", required = true)
    private String content;

    /**
     * html标签内容
     */
    @NotEmpty(message = "内容不能为空！")
    @NotNull(message = "内容不能为空！")
    @ApiModelProperty(name = "html", value = "html标签内容", required = true)
    private String html;
}
